package com.dk.code;

import com.dk.api.PartCodeAPI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author zh
 * @Description TODO
 * @createTime 2023/4/20
 */
@Component
@CodeType(codeType = "FIXCHAR")
public class FIXCHAR implements CodeService {

    @Autowired
    private PartCodeAPI partCodeAPI;

    @Override
    public String code(String partType, Long ruleId) {/*有type和id 根据他们俩查询*/
        String sysAutoCodeRule = partCodeAPI.selectByPartTypeAndRuleId(partType, ruleId);
        System.out.println(sysAutoCodeRule);//WH
        return sysAutoCodeRule;
    }
}
